# coding=utf-8
# @Time    : 2018/1/19 14:42
# @Author  : Jiangxu
# @File    : client.py
# @Software: PyCharm
import socket               # 导入 socket 模块

s = socket.socket()         # 创建 socket 对象
host = socket.gethostname() # 获取本地主机名
port = 12345                # 设置端口好

s.connect((host, port))
print s.recv(1024)
s.close()